package com.qk.management.mapper;

import com.qk.common.PageResult;
import com.qk.entity.Dept;
import com.qk.entity.Role;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * @author kaoM1Jy
 * @date 2025/10/8 20:01
 * @description:
 */
@Mapper
@SuppressWarnings("all")
public interface RoleMapper {
    @Select("select * from role where label = #{roleLabel}")
    Role selectByLabel(String roleLabel);

    @Select("select * from role where id = #{id}")
    Role selectById(Integer roleId);

    @Select("select id, name, label, remark, create_time, update_time from role")
    List<Role> selectAll();

    void update(Role role);

    @Delete("delete from role where id = #{id}")
    void deleteByID(Integer id);

    Integer count(String name, String label);

    List<Role> selectByPage(String name, String label, Integer offset, Integer pageSize);

    void insert(Role role);

   @Select("select * from role where id = #{id}")
    Role getById(Integer id);



}
